import Layout from '@/layouts/BasicLayout'
import LayoutInset from '@/layouts/LayoutInset'

const workspace = {
    path: '/workspace',
    redirect: '/workspace/overview/maintenance-record',
    component: Layout,
    name: 'Workspace',
    meta: {
        title: '工作台',
        code: 'dlyh_r_a1_1'
    },
    children: [
        {
            path: 'overview',
            redirect: '/workspace/overview/maintenance-record',
            component: LayoutInset,
            name: 'Overview',
            meta: {
                title: '统计概览',
                iconSvg: 'overview',
                code: 'dlyh_a1_b1_1'
            },
            children: [
                {
                    path: 'maintenance-record',
                    name: 'MaintenanceRecord',
                    meta: {
                        title: '智慧养护档案',
                        // 是否占满右边全屏显示
                        full: true,
                        code: 'dlyh_b1_c1_1'
                    },
                    component: () => import('@/views/workspace/overview/maintenance-record/index')
                }
            ]
        },
        {
            path: 'todo',
            redirect: '/workspace/todo/audit',
            component: LayoutInset,
            name: 'TodoList',
            meta: {
                title: '待办事项',
                iconSvg: 'audit',
                code: 'dlyh_a1_b2_1'
            },
            children: [
                {
                    path: 'audit',
                    name: 'AuditList',
                    component: () => import('@/views/workspace/todo/audit'),
                    meta: {
                        title: '本单位审核',
                        code: 'dlyh_b2_c2_1'
                    }
                },
                {
                    path: 'report',
                    name: 'ReportList',
                    component: () => import('@/views/workspace/todo/report'),
                    meta: {
                        title: '下级上报批复',
                        code: 'dlyh_b2_c3_1'
                    }
                },
                {
                    path: 'tasks',
                    name: 'AuditTasks',
                    component: () => import('@/views/workspace/todo/tasks'),
                    meta: {
                        title: '巡查任务',
                        code: 'dlyh_b2_c4_1'
                    }
                },
                {
                    path: 'audit-detail',
                    name: 'AuditDetail',
                    hide: true,
                    component: () => import('@/views/workspace/todo/audit-detail'),
                    meta: {
                        title: '审核详情',
                        activeMenu: '/workspace/todo/audit'
                    }
                },
                {
                    path: 'report-audit-detail',
                    name: 'ReporAuditDetail',
                    hide: true,
                    component: () => import('@/views/workspace/todo/audit-detail'),
                    meta: {
                        title: '审核详情',
                        activeMenu: '/workspace/todo/report'
                    }
                },
                {
                    path: 'budgeting-audit',
                    name: 'BudgetingAudit',
                    hide: true,
                    component: () => import('@/views/expense-plan/budget/budgeting-old/detail'),
                    meta: {
                        title: '表单审核',
                        activeMenu: '/workspace/todo/audit'
                    }
                },
                {
                    path: 'plan-road-audit',
                    name: 'RoadPlanAudit',
                    hide: true,
                    component: () => import('@/views/expense-plan/plan/road/detail'),
                    meta: {
                        title: '表单审核',
                        activeMenu: '/workspace/todo/audit'
                    }
                },
                {
                    path: 'plan-maintenance-audit',
                    name: 'PlanMaintenanceAudit',
                    hide: true,
                    component: () => import('@/views/maintenance-implement/implement/maintenance/detail'),
                    meta: {
                        title: '表单审核',
                        activeMenu: '/workspace/todo/audit'
                    }
                },
                {
                    path: 'budgeting-approval',
                    name: 'BudgetingApproval',
                    hide: true,
                    component: () => import('@/views/expense-plan/budget/budgeting-old/detail'),
                    meta: {
                        title: '表单批复',
                        activeMenu: '/workspace/todo/report'
                    }
                },
                {
                    path: 'plan-road-approval',
                    name: 'RoadPlanApproval',
                    hide: true,
                    component: () => import('@/views/expense-plan/plan/road/detail'),
                    meta: {
                        title: '表单批复',
                        activeMenu: '/workspace/todo/report'
                    }
                },
                {
                    path: 'plan-maintenance-approval',
                    name: 'PlanMaintenanceApproval',
                    hide: true,
                    component: () => import('@/views/maintenance-implement/implement/maintenance/detail'),
                    meta: {
                        title: '表单批复',
                        activeMenu: '/workspace/todo/report'
                    }
                },
                {
                    path: 'flaw-report',
                    name: 'FlawReport',
                    component: () => import('@/views/workspace/todo/flaw-report'),
                    meta: {
                        title: '缺陷病害处理',
                        code: 'dlyh_b2_c5_1'
                    }
                },
                {
                    path: 'maintenance',
                    name: 'Maintenance',
                    component: () => import('@/views/workspace/todo/maintenance'),
                    meta: {
                        title: '养护工程',
                        code: 'dlyh_b2_c6_1'
                    }
                },
                {
                    path: 'maintenance-task',
                    name: 'MaintenanceTask',
                    meta: {
                        title: '养护任务单',
                        code: 'dlyh_b3_c82_1'
                    },
                    component: LayoutInset,
                    redirect: '/workspace/todo/maintenance-task/index',
                    children: [
                        {
                            path: 'index',
                            name: 'MaintenanceTaskIndex',
                            meta: {
                                title: '列表',
                                componentName: 'MaintenanceProjectIndex',
                                activeMenu: '/workspace/todo/maintenance-task/index'
                            },
                            component: () => import('@/views/workspace/todo/maintenance-task/index'),
                            hide: true
                        },
                        {
                            path: 'detail',
                            name: 'MaintenanceTaskDetail',
                            hide: true,
                            component: () => import('@/views/workspace/todo/maintenance-task/detail'),
                            meta: {
                                title: '详情',
                                activeMenu: '/workspace/todo/maintenance-task/index'
                            }
                        },
                        {
                            path: 'approve',
                            name: 'MaintenanceTaskApprove',
                            hide: true,
                            component: () => import('@/views/workspace/todo/maintenance-task/detail'),
                            meta: {
                                title: '审批',
                                activeMenu: '/workspace/todo/maintenance-task/index'
                            }
                        },
                        // {
                        //     path: 'add',
                        //     name: 'MaintenanceTaskAdd',
                        //     hide: true,
                        //     component: () => import('@/views/workspace/todo/maintenance-task/add'),
                        //     meta: {
                        //         title: '新增',
                        //         activeMenu: '/workspace/todo/maintenance-task/index'
                        //     }
                        // },
                        // {
                        //     path: 'edit',
                        //     name: 'MaintenanceTaskEdit',
                        //     hide: true,
                        //     component: () => import('@/views/workspace/todo/maintenance-task/add'),
                        //     meta: {
                        //         title: '编辑',
                        //         activeMenu: '/workspace/todo/maintenance-task/index'
                        //     }
                        // }
                    ]
                }
            ]
        }
    ]
}

export default workspace
